/**
 * 全局可复制用的钩子函数(页面业务相关)
 */
import { ref, onMounted } from 'vue'
import { findBanner } from '@/api/home'
export function useBanner () {
  const slidersData = ref([])
  // 获取轮播图数据
  const getSlidersData = async () => {
    const { result } = await findBanner()
    // console.log(result)
    slidersData.value = result
  }
  onMounted(() => {
    getSlidersData()
  })
  return { slidersData }
}
